package decorator;

import sun.text.normalizer.CharTrie;

/**
 * @program: DesignModeProject
 * @description:调料品
 * @author: Li canzhang
 * @create: 2022-05-22 19:13
 **/
public class Decorator extends Drink{

    private Drink drink;

    public Decorator(Drink drink) {
        this.drink = drink;
    }

    @Override
    public float cost() {
        return super.getPrice() + drink.cost();
    }

    @Override
    public String getDes() {
        return super.getDes() + "  " + super.getPrice() + " && " + drink.getDes();
    }
}
